select count(id) as total from room_type order by sortid
MySQL server has gone away